﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.SignalR;

public class codingChatHub : Hub
{
    public void SendMessage(string message, string name)
    {
        Clients.All.sendAllMessge(message, name);
    }
    /*留言板廣播==================================================================*/
    public void MessageGroupAddUser(string GroupId)
    {
        Groups.Add(Context.ConnectionId, GroupId);
    }
    public void MessageGroupSend(string GroupId, string MessageId)
    {
        Clients.Group(GroupId).GroupMessage(MessageId);
    }
    public void MessageGroupRemoveUser(string GroupId)
    {
        Groups.Remove(Context.ConnectionId, GroupId);
    }

}
